package com.hevs.samplewebapp.client.dialogbox;

import com.google.gwt.user.client.Window;

/**
 * Server Response Messages
 * <p>It provides a window message to show the server response</p>
 * @author Lionel Rey
 * @date 26.03.2012
 *
 */
public abstract class ServerResponseMessages {
	
	/**
	 * Method to display different server status responses.
	 * Status "200" are always different, so there is no case for that
	 * @param status
	 * server status response after a request
	 */
	public static void statusCode(int status){
		switch (status) {
		case 400:
			Window.alert("Bad Request");
			break;
		case 403:
			Window.alert("Not Authorized");
			break;
		case 404:
			Window.alert("Not found!");
			break;
		case 405:
			Window.alert("Server method not found");
			break;
		default:
			break;
		}
	}
}
